package com.xbongbong.saas.model;

import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.pro.knowledge.base.pojo.KnowledgeBaseCountPojo;
import com.xbongbong.saas.domain.entity.KnowledgeDataEntity;

import java.util.List;
import java.util.Map;


/**
 * @author ruansicheng
 */
public interface KnowledgeDataModel extends IModel<KnowledgeDataEntity> {
    Integer insert(KnowledgeDataEntity entity);

    void insertBatch(List<KnowledgeDataEntity> list);

    List<KnowledgeDataEntity> findEntitys(Map<String, Object> param);

    Integer getEntitysCount(Map<String, Object> param);

    Integer update(KnowledgeDataEntity entity);

    KnowledgeDataEntity getByKey(Long key, String corpid);

    List findEntitysWithoutSub(Map<String, Object> param);

    Integer updateBatch(List<KnowledgeDataEntity> knowledgeDataEntities, String corpid);

    /**
     * @Author mingliang
     * @Description 根据知识库id列表统计总个数
     * @Date 2022/6/23 10:06
     * @param idList
     **/
    List<KnowledgeBaseCountPojo> getCountByKnowledgeId(String corpid,List<Long> idList);

    /**
     * 根据公司id，知识库id，删除知识库下面所有的知识条目
     * @param corpid
     * @param idList
     * @return
     */
    Integer deleteByCorpIdKnowledgeId(String corpid,List<Long> idList);

    List<Long> getIdListByCorpId(String corpid, List<Long> knowledgeList);

    List<String> getCorpidList();
}
